/**
 * @file xcd_log.h
 * @brief Logging functions
 * @author Guo-Rong Koh
 * @date 6 April 2008
 *
 * @par Copyright Notice
 * Copyright Guo-Rong Koh 2008.
 */

/*
 * This file is part of xceed.
 *
 * xceed is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License Version 2 as published by the Free
 * Software Foundation.
 *
 * xceed is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * xceed.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef XCD_LOG_H
#define XCD_LOG_H 1

/**
 * Log level enumerations.
 */
typedef enum
{
    /** Debug log level. */
    XCD_LOG_DEBUG,

    /** Error log level. */
    XCD_LOG_ERROR
} xcd_log_level_t;

/**
 * Log a message.
 *
 * @param[in] log_level Log message level.
 * @param[in] format    printf style log message.
 * @param[in] ...       printf style arguments.
 */
void xcd_logf(xcd_log_level_t log_level,
              const char     *format,
              ...) __attribute__((format(printf,2,3)));

#endif
